c# serviceCollection AddLogging

134

c# serviceCollection AddLogging -

public void ConfigureServices(IServiceCollection services)
{
    services.AddLogging(logging => 
    {
        logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
        logging.AddConsole();
        logging.AddDebug();
        logging.AddAzureWebAppDiagnostics();
    }
}

Comments

Submit
0 Comments